<template>
	<div>
		<!-- 三级联动组件 -->
		<TypeNav></TypeNav>
		<ListContainer></ListContainer>
		<Recommend></Recommend>
		<Rank></Rank>
		<Like></Like>
		<Floor v-for="item in floor" :key="item.id" :item="item"></Floor>
		<Brand></Brand>
	</div>
</template>

<script>
// 轮播图
import ListContainer from './listContainer/index';
import Recommend from './Recommend';
import Rank from './Rank/Rank';
import Like from './Like/Like';
import Floor from './Floor/Floor';
import Brand from './Brand/Brand';

import { mapState } from 'vuex';
export default {
	name: 'Home',
	components: {
		ListContainer,
		Recommend,
		Rank,
		Like,
		Floor,
		Brand
	},
	mounted() {
		this.$store.dispatch('getFloor');
	},
	computed: {
		...mapState({
			floor: state => state.home.floor
		})
	}
};
</script>

<style></style>
